﻿using System;
using SharpSqlAnalyzer.nodes;

namespace SharpSqlAnalyzer.stmt
{
	// Token: 0x020000B9 RID: 185
	public class TRenameStmt : TCustomSqlStatement
	{
		// Token: 0x0600065E RID: 1630 RVA: 0x002FE7DD File Offset: 0x002FC9DD
		public TRenameStmt(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstrename;
		}

		// Token: 0x1700011A RID: 282
		// (get) Token: 0x0600065F RID: 1631 RVA: 0x002FE7EE File Offset: 0x002FC9EE
		// (set) Token: 0x06000660 RID: 1632 RVA: 0x002FE7F6 File Offset: 0x002FC9F6
		public virtual TObjectName NewName
		{
			get
			{
				return this.newName;
			}
			set
			{
				this.newName = value;
			}
		}

		// Token: 0x1700011B RID: 283
		// (get) Token: 0x06000661 RID: 1633 RVA: 0x002FE7FF File Offset: 0x002FC9FF
		// (set) Token: 0x06000662 RID: 1634 RVA: 0x002FE807 File Offset: 0x002FCA07
		public virtual EDbObjectType ObjectType
		{
			get
			{
				return this.objectType;
			}
			set
			{
				this.objectType = value;
			}
		}

		// Token: 0x1700011C RID: 284
		// (get) Token: 0x06000663 RID: 1635 RVA: 0x002FE810 File Offset: 0x002FCA10
		// (set) Token: 0x06000664 RID: 1636 RVA: 0x002FE818 File Offset: 0x002FCA18
		public virtual TObjectName OldName
		{
			get
			{
				return this.oldName;
			}
			set
			{
				this.oldName = value;
			}
		}

		// Token: 0x06000665 RID: 1637 RVA: 0x002FE824 File Offset: 0x002FCA24
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			this.oldName = (TObjectName)((TDummy)this.rootNode).node1;
			this.newName = (TObjectName)((TDummy)this.rootNode).node2;
			this.objectType = ((TDummy)this.rootNode).objectType;
			return 0;
		}

		// Token: 0x06000666 RID: 1638 RVA: 0x002FE890 File Offset: 0x002FCA90
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000667 RID: 1639 RVA: 0x002FE8A0 File Offset: 0x002FCAA0
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x0400118E RID: 4494
		private TObjectName oldName;

		// Token: 0x0400118F RID: 4495
		private TObjectName newName;

		// Token: 0x04001190 RID: 4496
		private EDbObjectType objectType;
	}
}
